/*
 * 上海远境文化传媒有限公司 版权所有
 */
package ext.play;

import play.jobs.Job;

/**
 * 延时操作包装类.
 */
public class LaterJob {

    public static void doJobInLater(String delay, Runnable runnable) {
        new Job() {
            @Override
            public void doJob() throws Exception {
                runnable.run();
            }
        }.in(delay);
    }

    public static void doJobInLaterSecond(Integer delay, Runnable runnable) {
        new Job() {
            @Override
            public void doJob() throws Exception {
                runnable.run();
            }
        }.in(delay);
    }
}
